package com.ddz.implementation;

import com.ddz.fightthelandlord.Card;
import com.ddz.fightthelandlord.Player;

public class ObjectFactory<T> {
	
	// create an object in the factory
	public Entity createObject(OBJECT_GROUPS objectGroup) {
		Entity object = null;
		ObjectManager objManager = ObjectManager.getInstance();
		switch(objectGroup) {
		case OBJECT_GROUP_PLAYER:
			object = new Player();
			objManager.addObject(object, objectGroup);
			break;
		case OBJECT_GROUP_CARD:
			object = new Card();
			objManager.addObject(object, objectGroup);
			break;
		default:
			break;
		}
		return object;
	}
}
